package model;

/**
 * Class represents an order made in store. 
 * Order is made when a customer wishes to buy a product
 */
public class Order {

	// order's details
	int orderNumber;
	String date;
	int orderingCustomerNumber;
	String orderedProductName;
	int amount;
	double totalSum;
	
	/**
	 * Constructor- creates a new order with given details
	 * @param orderNumber- new order's number
	 * @param date- date when order was made
	 * @param orderingCustomerNumber- number of client who had made the order
	 * @param orderedProductName- name of ordered product
	 * @param amount- how many pieces are ordered
	 * @param totalSum- how much should the customer pay
	 */
	public Order(int orderNumber, String date, int orderingCustomerNumber,
			String orderedProductName, int amount, double totalSum) {
	
		// set members according to given values
		this.orderNumber = orderNumber;
		this.date = date;
		this.orderingCustomerNumber = orderingCustomerNumber;
		this.orderedProductName = orderedProductName;
		this.amount = amount;
		this.totalSum = totalSum;
	}

	/**
	 * Returns order's number
	 * @return order's number attribute
	 */
	public int getOrderNumber() { return orderNumber; }

	/**
	 * Returns order's date 
	 * @return order's date attribute
	 */
	public String getDate() { return date; }

	/**
	 * Returns number of client who had made the order 
	 * @return ordering customer number  attribute
	 */
	public int getOrderingCustomerNumber() { return orderingCustomerNumber; }

	/**
	 * Returns name of ordered product 
	 * @return ordered product name attribute
	 */
	public String getOrderedProductName() { return orderedProductName; }

	/**
	 * Returns ordered amount
	 * @return ordered amount attribute
	 */
	public int getAmount() { return amount; }

	/**
	 * Returns how much customer should pay 
	 * @return order's total sum attribute
	 */
	public double getTotalSum() { return totalSum; }	
}